//
//  WBDev01Model.m
//  WeatherBar
//
//  Created by Bert on 2024/6/19.
//

#import "WBDev01Model.h"

@interface WBDev01Model ()
//dev01 手机设备信息 登录上报
//@property (nonatomic ,copy) NSString *airplane_mode; //飞行模式
//@property (nonatomic ,copy) NSString *activeTime; //从开机到目前的毫秒数，不包括休眠时间
//@property (nonatomic ,copy) NSString *afId; //appsflyer获取的id
//@property (nonatomic ,copy) NSString *androidId;
//@property (nonatomic ,copy) NSString *baseband; //基带版本
//@property (nonatomic ,copy) NSString *BatteryPercent; //电量
//@property (nonatomic ,copy) NSString *BatteryTemperature; //电池温度
//@property (nonatomic ,copy) NSString *batteryVoltage; //电池电压
//@property (nonatomic ,copy) NSString *bluetoothName; //蓝牙名
//@property (nonatomic ,copy) NSString *board; //Build主板
//@property (nonatomic ,copy) NSString *bootloader;  //Build bootloader
//@property (nonatomic ,copy) NSString *bootTime; //开机时刻的时间戳(毫秒)
//@property (nonatomic ,copy) NSString *brightness; //手机屏幕亮度
//@property (nonatomic ,copy) NSString *build_incremental; //Build内部版本号
//@property (nonatomic ,copy) NSString *build_time;  //build_time
//@property (nonatomic ,copy) NSString *cellLoaction; //当前连接的基站信息
//@property (nonatomic ,copy) NSString *chargerPlugged; //充电方式
//@property (nonatomic ,copy) NSString *chargerFull;  //是否充满电还连接着充电器
//@property (nonatomic ,copy) NSString *cpuInfo;  //cpu信息
//@property (nonatomic ,copy) NSString *cpuType;  //CPU 类型
//@property (nonatomic ,copy) NSString *curCpuFreq; //CPU的当前频率
//@property (nonatomic ,copy) NSString *meid;  //第一个移动设备识别码(Mobile Equipment Identifier)
//@property (nonatomic ,copy) NSString *meid2; //第二个移动设备识别码(Mobile Equipment Identifier)
//@property (nonatomic ,copy) NSString *device; //Build设备
//@property (nonatomic ,copy) NSString *drivers;  //驱动
//@property (nonatomic ,copy) NSString *external_imagenums; //硬盘照片数
//@property (nonatomic ,copy) NSString *fingerprint;  //Build指纹
//@property (nonatomic ,copy) NSString *freeExternal;  //硬盘可用空间
//@property (nonatomic ,copy) NSString *freeInternal;  //内存可用空间
//@property (nonatomic ,copy) NSString *freeRam; //可用内存字节数
//@property (nonatomic ,copy) NSString *gateway; //网关
//@property (nonatomic ,copy) NSString *hardware; //Build硬件
//@property (nonatomic ,copy) NSString *internal_imagenums;  //内存照片数
//@property (nonatomic ,copy) NSString *isSystemApp; //是否是系统app
//@property (nonatomic ,copy) NSString *radio_version;  //radio版本

@property (nonatomic ,copy) NSString *b; //区分不同的业务
@property (nonatomic ,copy) NSString *c; //区分影子
@property (nonatomic ,copy) NSString *freespace;  //可用存储
@property (nonatomic ,copy) NSString *brand; //Build品牌
@property (nonatomic ,copy) NSString *idfa; //广告标识符（iOS）
@property (nonatomic ,copy) NSString *idfv;
@property (nonatomic ,copy) NSString *imei;  //移动设备国际身份码
//@property (nonatomic ,copy) NSString *imei2; //移动设备国际身份码2
@property (nonatomic ,copy) NSString *imsi;  //国际移动用户识别码
//@property (nonatomic ,copy) NSString *imsi2; //国际移动用户识别码(卡二)
@property (nonatomic ,assign) BOOL isPad; //是否平板
@property (nonatomic ,assign) BOOL isSimulator; //是否是模拟器
@property (nonatomic ,assign) BOOL is_vpn_used;  //是否开启vpn
@property (nonatomic ,assign) BOOL is_wifi_proxy;  //是否开启代理
@property (nonatomic ,assign) BOOL isCharging; //是否正在冲充电
@property (nonatomic ,assign) BOOL isRooted; //手机是否 root
@property (nonatomic ,assign) BOOL root;  //是否root

@property (nonatomic ,copy) NSString *ipv4;
@property (nonatomic ,copy) NSString *ipv6;
@property (nonatomic ,copy) NSString *locale;  //当前系统语言
@property (nonatomic ,copy) NSString *memInfo; //内存信息
@property (nonatomic ,copy) NSString *model;  //手机型号
@property (nonatomic ,copy) NSString *modelName;  //根据model转换后的值，符合一般人理解的型号 如model “iPhone9,1” 实际 modelName是
@property (nonatomic ,copy) NSString *nativePhoneNum; //本机号
@property (nonatomic ,copy) NSString *nativePhoneNum2; //本机号(卡二)
@property (nonatomic ,copy) NSString *networkType;  //网络类型
@property (nonatomic ,copy) NSString *providersName; //手机服务商名称
//@property (nonatomic ,copy) NSString *providersName2; //手机服务商名称(卡二)
@property (nonatomic ,copy) NSString *ram;  //运行内存
@property (nonatomic ,copy) NSString *screenSize; //屏幕尺寸
@property (nonatomic ,copy) NSString *sysVersion; //系统版本
@property (nonatomic ,copy) NSString *timeZone;  //当前时区
@property (nonatomic ,copy) NSString *tokenId; //数据上报唯一标识（32位随机字符串uuid）
@property (nonatomic ,copy) NSString *wifiMac;  //wifimac地址

@end

@implementation WBDev01Model

+ (NSDictionary *)wb_getParameter {
    WBDev01Model *var_model = [[WBDev01Model alloc] init];
    NSDictionary *var_dic = [var_model model_keyValues];
    return var_dic;
}

- (void)wb_config {
    NSDictionary *var_dic = [WBInfoManager wb_shareInstance].var_businessInfo;
    self.mid = @"DEV01";  
    self.b = [var_dic valueForKey:@"b"]; //区分不同的业务
    self.c = [var_dic valueForKey:@"c"]; //区分影子
    self.brand = @"apple"; //Build品牌
    self.idfa = [UIDevice wb_getIdfaOrIdfv]; //广告标识符（iOS）
    self.idfv = [UIDevice wb_getIdfaOrIdfv];
    self.imei = @"";  //移动设备国际身份码
    self.imsi = @"";  //国际移动用户识别码
    self.isPad = kIsPad; //是否平板
    self.isSimulator = kIsSimulator; //是否是模拟器
    self.is_vpn_used = [UIDevice wb_isVPNOn];  //是否开启vpn
    self.is_wifi_proxy = [UIDevice wb_isProxy];  //是否开启代理
    self.isCharging = [UIDevice wb_isCharging]; //是否正在冲充电
    self.isRooted = [UIDevice wb_isRoot]; //手机是否 root
    self.root = [UIDevice wb_isRoot];  //是否root
    self.ipv4 = [WBIPTool wb_getIPV4];
    self.ipv6 = [WBIPTool wb_getIPV6];
    self.locale = [NSLocale preferredLanguages].firstObject;  //当前系统语言
    self.freespace = [NSString stringWithFormat:@"%lld", [UIDevice wb_freeDiskSpaceBytes]];  //可用存储
    self.memInfo = [NSString stringWithFormat:@"%lu", (unsigned long)[UIDevice wb_freeMemoryBytes]]; //内存信息
    self.model = [UIDevice wb_platform];  //手机型号
    self.modelName = [UIDevice wb_platformString];  //根据model转换后的值，符合一般人理解的型号 如model “iPhone9,1” 实际 modelName是
    self.nativePhoneNum = [UIDevice wb_devicePhoneNum]; //本机号
    self.networkType = [UIDevice wb_getNetworkType];  //网络类型
    self.providersName = [UIDevice wb_carrierNames].firstObject; //手机服务商名称
    self.ram = [NSString stringWithFormat:@"%lu", (unsigned long)[UIDevice wb_freeMemoryBytes]];  //运行内存
    self.screenSize = [UIDevice wb_screenInches]; //屏幕尺寸
    self.sysVersion = [UIDevice currentDevice].systemVersion; //系统版本
    self.timeZone = [[NSTimeZone localTimeZone] name];  //当前时区
    self.tokenId = [UIDevice wb_createUUID]; //数据上报唯一标识（32位随机字符串uuid）
    self.wifiMac = [UIDevice wb_macaddress];  //wifimac地址
}



@end
